package com.etc.service;

import com.etc.common.ServerResponse;
import com.etc.entity.Talk;
import com.etc.vo.TalkVo;

/**
 * Created by zhp on 2018/8/7.
 */
public interface TalkService {

    public ServerResponse<Talk> selectByTid(String tid);

    /**
     *
     * @Description: 插入评论 通过拿到的talk 判断Ttopicid 来知道是回复文章 还是回复用户
     *
     * @auther: 臧浩鹏
     * @date: 9:45 2018/8/7
     * @param: [talk, fatherId, fatherTime]
     * @return: com.etc.common.ServerResponse
     *
     */
    public ServerResponse<TalkVo> insertTalk(Talk talk, Integer fatherId, String fatherTime);


    /**
     *
     * @Description: 控评
     *
     * @auther: 臧浩鹏
     * @date: 8:40 2018/8/7
     * @param: [talk]
     * @return: com.etc.common.ServerResponse
     *
     */
    public ServerResponse<Integer> deleteTalk(Integer tid);

    /**
     *
     * @Description: 查找文章全部一级评论时 uid = 0,createTime = null; 查看某人的所有评论时 要传递该人评论的createtime参数
     *               查找文章全部评论时 all = true
     * @auther: 臧浩鹏
     * @date: 8:49 2018/8/7
     * @param: [tcategory, tarticleid, uid,createTime,all]
     * @return: com.etc.common.ServerResponse
     *
     */
    public ServerResponse searchTalkAll(String tcategory, Integer tarticleid, Integer uid, String createTime, Boolean all);

    Integer selectNumsByCidAndAid(String joke, Integer jid);
}
